#include "Capsule.h"

const HashString Capsule::COLLISIONTYPE("COLLISION_CAPSULE");

void Capsule::Transform(const Matrix4x4& transform)
{
	Vector3 newPoint;
	TranslateVector( newPoint, segment.start, transform );
	segment.start = newPoint;
	TranslateVector( newPoint, segment.end, transform );
	segment.end = newPoint;
}

void Capsule::Translate(const Vector3& translation)
{
	segment.start += translation;
	segment.end += translation;
}

ConsoleWindow& Capsule::Print(ConsoleWindow& out) const
{
	return out << "\nCAPSULE:\n" << "Segment:  " << segment << "\nRadius:  " << radius << "\n";
}